Skip to content

Comments

[wasm][coreclr] Make run.cmd work with wasm arch#124795

Open
radekdoulik wants to merge 1 commit intodotnet:mainfrom
radekdoulik:wasm-coreclr-run-cmd-wasm
Open

[wasm][coreclr] Make run.cmd work with wasm arch#124795
radekdoulik wants to merge 1 commit intodotnet:mainfrom
radekdoulik:wasm-coreclr-run-cmd-wasm

Conversation

@radekdoulik
Copy link
Member

No description provided.

@radekdoulik radekdoulik added this to the Future milestone Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 14:36
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables run.cmd (Windows test runner script) to work correctly with the wasm architecture by fixing platform detection logic. The changes distinguish between the build machine OS (where scripts run) and the target OS (what the tests target), which is essential for cross-compilation scenarios like WASM.

Changes:

  • Fixed platform detection in run.py to use sys.platform instead of args.host_os for determining file extensions and script types
  • Added wasm architecture support to run.cmd with proper defaults (HostOS=browser, RunWithNodeJS=1)
  • Fixed MSBuild condition in tests.targets to use build machine OS instead of target OS for chmod commands

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/tests/run.py Changed from args.host_os to sys.platform for determining Windows-specific file extensions (.exe, .cmd, .bat) since these depend on the build machine, not target OS
src/tests/run.cmd Added wasm architecture support with automatic HostOS=browser default and RunWithNodeJS flag, mirroring existing run.sh behavior
src/tests/Common/tests.targets Changed from TargetOS to OS MSBuild property for chmod condition to properly detect build machine OS

# For some reason, out-of-process tests on Linux are named with ".cmd" wrapper script names,
# not .sh extension names. Fix that before trying to find the test filename.
if host_os != "windows":
if sys.platform != "win32":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this is for consistency, but these two options (before and after) should be equivalent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants